<g:formRemote name="registerForm" url="[action:'update']" onSuccess="${remoteFunction(controller:'investments',action:'allcurrent',update:'main')}">
  <g:hiddenField name="id" value="${buy.id}" />
  <table>
    <tr>
      <td class="leftside">
        Stock:
      </td>
      <td class="rightside">
        ${buy.stock}
      </td>
    </tr>
    <tr>
      <td class="leftside">
        Number of stocks bought:
      </td>
      <td class="rightside">
    <g:textField name="count" value="${buy.count}" size="10" />
    </td>
    </tr>
    <tr>
      <td class="leftside">
        price per stock (SEK):
      </td>
      <td class="rightside">
    <g:textField name="price" value="${buy.price}" size="10" />
    </td>
    </tr>
    <tr>
      <td class="leftside">
        Target price (SEK)):
      </td>
      <td class="rightside">
    <g:textField name="target" value="${buy.target}" size="10" />
    </td>
    </tr>
    <tr>
      <td class="leftside">

      </td>
      <td class="rightside">
    <g:submitButton name="save" value="Save" />
    <input type="button" value="Cancel" onClick="<g:remoteFunction controller='investments' action='current' id='${buy.id}' update='buy_${buy.id}' />" />
    </td>
    </tr>
  </table>
</g:formRemote>
